<table id="files" style="indent">
  {% if file_list %}
    {% for file in file_list %}
      <tr id="file{{ file.id }}">
        <td class="file_title">
          <a href="{{file.url}}">{{ file.file_title }} ({{ file.filename }})</a>
        </td>
        {% if file.file_description %}
        <td class="file_description">
          - {{ file.file_description }}
        </td>
        {% endif %}
        {% if perms.files.delete_file %}
        <td>
          <form action="{% course_url management app='files' command='delete' arguments=file.id %}" method="POST">{% csrf_token %}
          <button type="submit" class="button DeleteButton smallbutton" name="DeleteFile" value="{{ file.id }}"  title="Delete This File">X</button>
          <input type="hidden" name="next" value="{{request.path}}"></input>
          </form>
        </td>
        {% endif %}
      </tr>
    {% endfor %}
  {% else %}
    <tr><td>No files uploaded yet</td></tr>
  {% endif %}
</table>
